# -*- coding:utf-8 -*-
'''

@File : QuickSort.py

@Author: 爸爸

@Date : 2019/5/15

@Desc :py 快速排序
'''

def quicksort(array):
    if len(array)<2:
        return array
    pivot=array[0]
    left=[i for i in array[1:] if i <pivot]
    right=[i for i in array[1:] if i>pivot ]
    print(left,pivot,right)
    return quicksort(left)+[pivot]+quicksort(right)

arr=[15,48,64,23,4,3,6,98,25,65,14]
print(quicksort(arr))